@isTest
private class LogisticalFeedBackControllerTest {
    static testMethod void testMethod1() {
        

    	Feedback__c fb = new Feedback__c();
    	fb.RecordTypeId = Utils.getRecordTypeIdByDevNameAndObjName('LogicFeedBack', 'Feedback__c');
    	fb.ExwareNo__c= 'xc00001';
    	fb.CarriageNumber__c ='00012445';
    	fb.Sendtime__c = System.now();
    	fb.Name = 'WL-xc00001';
    	insert fb;

        LogisticalFeedBackController lfb = new LogisticalFeedBackController();
       // lfb.getLogicFeedBack();

        Map<String,String> condition = new Map<String,String>();

        condition.put('sendtime_begin', '2018-12-17 00:00:00');
        lfb.searchJson = EncodingUtil.urlEncode(JSON.serialize(condition), 'UTF-8') ;
        lfb.search();

        List<Object> confirList = new List<Object>();
        Map<String,String> confirMap  = new Map<String,String>();
        confirMap.put('ncid', 'xc00001');
        confirMap.put('carrierno', '00012445');

        confirMap.put('accountname', 'xc00001');
        confirMap.put('search_sendtime_begin', '2018-12-17');

        confirMap.put('search_sendtime_end', '2018-12-17');



        confirList.add(confirMap);

        lfb.cofirmJson = EncodingUtil.urlEncode(JSON.serialize(confirList), 'UTF-8');

        lfb.confirmCarrier();

        lfb.cofirmJson = EncodingUtil.urlEncode('[{"customer_order_no":"xc00001","delivery_status":"1"}]','UTF-8');


        lfb.confirmCarrierTotms();


        lfb.cofirmJson = EncodingUtil.urlEncode('[{"backbill":"是","ncid":"xc00001"}]','UTF-8');
        //lfb.saveBackBill();
        LogisticalFeedBackController.importBackBills(EncodingUtil.urlEncode('[{"backbill":"是","ncid":"xc00001"}]','UTF-8'));


        LogisticalFeedBackController.query('select Id,OutgoingNumber__c,OutdoorDate__c,IsBack__c ,AccountName__c,Remark__c,TransMethod__c,Saler__c,CarrierName__c from BackBill__c  ');
        LogisticalFeedBackController.queryMore('select Id,OutgoingNumber__c,OutdoorDate__c,IsBack__c ,AccountName__c,Remark__c,TransMethod__c,Saler__c,CarrierName__c from BackBill__c order by Id ', '');



    }
}